package com.atguigu.tingshu.user.service.impl;

import com.atguigu.tingshu.model.user.VipServiceConfig;
import com.atguigu.tingshu.user.mapper.VipServiceConfigMapper;
import com.atguigu.tingshu.user.service.VipServiceConfigService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@SuppressWarnings({"unchecked", "rawtypes"})
public class VipServiceConfigServiceImpl extends ServiceImpl<VipServiceConfigMapper, VipServiceConfig> implements VipServiceConfigService {

	@Autowired
	private VipServiceConfigMapper vipServiceConfigMapper;



    /**
     * 获取所有VIP套餐信息
     * @return VIP套餐信息集合
     */
    @Override
    public List<VipServiceConfig> findAllVipServiceConfig() {
        return baseMapper.selectList(null);
    }


    /**
     * [rpc]
     * 根据vip套餐的id获取套餐信息
     * @param itemId 套餐id
     * @return 套餐信息
     */
    @Override
    public VipServiceConfig getVipConfigById(Long itemId) {
        return vipServiceConfigMapper.selectById(itemId);
    }
}
